package cn.com.huzo.model.entities.master;

import huzofw.model.entities.BaseEntity;
import huzofw.model.entities.IAggregateRoot;
import java.io.Serializable;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;

/**
 * 到货允许实体类
 *
 * @author 吴旭
 */
public class ArrivalAllowedEntity extends BaseEntity implements Serializable, IAggregateRoot {

    private static final long serialVersionUID = -1818463615542007047L;
    private Long AllowanceId;
    private Long MaterialToleranceTypeId;
    private String MaterialToleranceTypeName;
    private Float Minimum;
    private Float Maximum;
    private Float ArrivalAllowed;       // 到货允许

    public Long getAllowanceId() {
        return AllowanceId;
    }

    public Long getMaterialToleranceTypeId() {
        return MaterialToleranceTypeId;
    }

    public String getMaterialToleranceTypeName() {
        return MaterialToleranceTypeName;
    }

    public Float getMinimum() {
        return Minimum;
    }

    public Float getMaximum() {
        return Maximum;
    }

    public Float getArrivalAllowed() {
        return ArrivalAllowed;
    }

    public void setAllowanceId(Long AllowanceId) {
        this.AllowanceId = AllowanceId;
    }

    public void setMaterialToleranceTypeId(Long MaterialToleranceTypeId) {
        this.MaterialToleranceTypeId = MaterialToleranceTypeId;
    }

    public void setMaterialToleranceTypeName(String MaterialToleranceTypeName) {
        this.MaterialToleranceTypeName = MaterialToleranceTypeName;
    }

    public void setMinimum(Float Minimum) {
        this.Minimum = Minimum;
    }

    public void setMaximum(Float Maximum) {
        this.Maximum = Maximum;
    }

    public void setArrivalAllowed(Float ArrivalAllowed) {
        this.ArrivalAllowed = ArrivalAllowed;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof ArrivalAllowedEntity)) {
            return false;
        }

        final ArrivalAllowedEntity that = (ArrivalAllowedEntity) o;

        return new EqualsBuilder()
                .append(this.getAllowanceId(), that.getAllowanceId())
                .isEquals();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int hashCode() {
        int result = 17;
        result = 31 * result + this.getAllowanceId().hashCode();

        return result;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
